home *** CD-ROM | disk | FTP | other *** search
- ;January 7, 1987
- ;Satore Center OPUS 161/521
- ;
- ;Since there have been some questions about setting up a BATch file
- ;for OPUS, here is a sample for you to review. Comments are always
- ;preceeded by a semi-colon.
- ;
- ;Your own BATch file should be much simpler than this. We've thrown
- ;everything we could think of here just to provide some examples for
- ;deep thought and meditation...
-
- ;Start BATch file here
- ;
- :START
- ;If you are using WATCHDOG to monitor the status of your modem, be
- ;sure and turn it off before invoking OPUS. Otherwise your system
- ;will reboot after the caller disconnects. If you are not using
- ;WATCHDOG then disregard this.
- ;
- watchdg1 off
- ;
- ;Here we invoke OPUS. We are using the '-u' command line switch
- ;to make OPUS unpacket any ARCmail packets it may find before it
- ;goes online. This is optional -- see your documentation.
- ;
- opus opus -u
- ;
- ;Here we check for ERRORLEVELS do do various things...
- ; ENDCALLER = Where OPUS goes after a caller disconnects.
- ; This is an option in the OPUS CTL file.
- ; ROBOTMAIL = Does any ROBOT auto-mailing stuff.
- ; OUTSIDE = Where the Main Menu O) options goes.
- ; REMOTE = For Sysop-level Zero DOS drop (Sysop Menu).
- ; START = The beginning of the BATch file.
- ; EM = Where the outgoing mail is handled.
- ; MAKELOGS = Daily maintenance.
- ; WARMBOOT = Boots the system.
- ; ECHOMAIL = Where EchoMail is done.
- ; QUICKTOSS = What happens after CRASHMAIL is received.
- ; Another option -- see the CTL file.
- ; CLEANUP = More daily maintenance.
- ;
- ;This is a VERY complex sample BATch file. Your need not be anything
- ;like this at all. We have just tried to show most of the possibilities
- ;which can be encountered.
- ;
- if errorlevel 25 goto ENDCALLER
- if errorlevel 24 goto ROBOTMAIL
- if errorlevel 23 goto OUTSIDE
- if errorlevel 22 goto REMOTE
- if errorlevel 21 goto START
- if errorlevel 20 goto EM
- if errorlevel 15 goto MAKELOGS
- if errorlevel 13 goto WARMBOOT
- if errorlevel 12 goto ECHOMAIL
- if errorlevel 11 goto QUICKTOSS
- if errorlevel 10 goto CLEANUP
- if errorlevel 2 goto START
- GOTO FINIS
-
-
- ;When a user hits the O) option from the Main Menu, this sample file
- ;invokes the outside service called OUTER. You could also use OUTSIDE
- ;or, in fact, any program of your own choosing.
- ;
- :OUTSIDE
- watchdg1 on
- ctty com1
- echo off
- cls
- echo ------------------------------------------------------
- echo Loading OUTSIDE Service, please wait ...
- echo ------------------------------------------------------
- outer 128/v /1 15/l
- cls
- echo ------------------------------------------------------
- echo Please do not disconnect until you see OPUS ...
- echo ------------------------------------------------------
- ctty con
- ;
- ;The caller has quit OUTER and we now go back to OPUS at the start of
- ;the BATch file.
- ;
- GOTO START
-
-
- ;From the sysop menu, this is where the OUTSIDE (for Sysops) goes...
- ;
- :REMOTE
- watchdg1 on
- ctty com1
- cls
- echo ------------------------------------------------------
- echo Use EXIT to return to OPUS
- echo ------------------------------------------------------
- command
- ctty con
- baud
- ;
- ;Here is a little trick. The program BAUD will return an errorlevel
- ;based upon the callers baud rate. According to the baud rate we call
- ;OPUS using the baud command line switch. To the caller this appears
- ;as though OPUS has been recalled normally. However, notice that we
- ;never turned WATCHDOG off! Therefore, after the caller disconnects
- ;the system will do a warm boot and restart the BATch file. Thsi is
- ;an added precaution which really isn't necessary but is a good
- ;practice (to boot from time to time).
- ;
- if errorlevel 240 goto opus24
- opus online -b1200
- goto start
- :opus24
- opus online -b2400
- GOTO START
-
-
- ;If you asked OPUS (in the CTL file) to exit after each caller, here
- ;is where it would go. Under normal circumstances this is a feature
- ;which doesn't have a lot of purpose unless you need to do some special
- ;processing after each caller.
- ;
- :ENDCALLER
- GOTO START
-
-
- ;Since OPUS doesn't handle outgoing mail yet, you must have some other
- ;mailer program do the work for you. In this case we are using SEAdog(tm).
- ;Fido(tm) works fine too.
- ;
- :EM
- mailer
- GOTO START
-
-
- ;We go here for daily maintenance...
- ;
- :CLEANUP
- ;
- ;do whatever...
- ;
- GOTO START
-
- ;Here is where we handle EchoMail if you choose to do your own toss
- ;and scan. Remember that OPUS can do toss automatically for you if
- ;you choose. See the documentation and the CTL file for examples.
- ;
- :ECHOMAIL
- ;do toss, scan, arcmail, killdupes, whatever...
- GOTO START
-
-
- ;If you choose it in the CTL file, OPUS will exit after it receives
- ;CRASHMAIL to do any processing you want. This is also where OREMOTE
- ;lives if you use it (see OREMOTE documentation -- a separate utility).
- ;
- :QUICKTOSS
- ;do whatever...
- ;do OREMOTE...
- GOTO START
-
- ;Just another maintenance thingy to liven up the BATch file...
- ;
- :MAKELOGS
- ;how about ARCing those massive logs?
- ;
-
- ;If you like to reboot your system automatically from time to time...
- ;
- :WARMBOOT
- echo ------------------------------------------------------
- echo Rebooting the system
- echo ------------------------------------------------------
- warm
-
- ;If you're a hub you may need to ROBOTIZE your friends...
- ;
- :ROBOTMAIL
- echo ------------------------------------------------------
- echo Processing ROBOT Mail
- echo ------------------------------------------------------
- ;robomail ... etc...
- goto START
-
- ;And here is where we go when you hit control-c from the keyboard...
- ;
- :FINIS
- echo on
- cls